package com.example.android.navigationdrawerexample.fragment;

import com.example.android.navigationdrawerexample.R;

import android.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;

public class SearchFragment extends Fragment {
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		Log.v("Chinh", "onCreateView");
		ViewGroup root = (ViewGroup) inflater.inflate(R.layout.framgent_search,
				null);
		Button btnClick =(Button)root.findViewById(R.id.btnClick);
		btnClick.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Toast.makeText(getActivity(), "Click", Toast.LENGTH_SHORT).show();
			}
		});
		return root;
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.v("Chinh", "onCreate");
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
		Log.v("Chinh", "onDestroy");
	}

	@Override
	public void onPause() {
		super.onPause();
		Log.v("Chinh", "onPause");
	}

	@Override
	public void onResume() {
		super.onResume();
		Log.v("Chinh", "onResume");
	}

	@Override
	public void onStart() {
		super.onStart();
		Log.v("Chinh", "onStart");
	}

	@Override
	public void onStop() {
		super.onStop();
		Log.v("Chinh", "onStop");
	}

//	public void initWidget() {
//		
//	}
}
